<template>
  <div ref="viewBox" >
    <headNav title="账户明细" ></headNav>
    <!-- 标题栏 -->
    <div class="titleDiv" >
      <div class="flexCenter" :class="{choiceCss: num == 1}" @click="num = 1" >支付明细</div>
      <div class="flexCenter" :class="{choiceCss: num == 2}" @click="num = 2" >充值明细</div>
    </div>
    <!-- 充值模块 -->
    <div class="flexHeight smallDiv " v-for="val in 3" v-if="num == 2" >
      <div class="topCss">
        <img src="@/assets/img/my/recharge.png" alt="" >
        <span>充值</span>
        <span class="numCss" >+9000.00</span>
      </div>
      <span class="timeNum" >充值时间：2020-05-08 10:32</span>
      <span class="timeNum" >订单编号：62345615151535</span>
    </div>
    <!-- 支付模块 -->
    <div class="flexHeight paymentDiv" v-for="val in 3" v-if="num == 1" >
      <div class="flexAlign" >
        <img src="@/assets/img/my/consumption.png" alt="" >
        <span>福宇洗衣店</span>
        <span style="margin-left: 2.8rem;" >-396.00</span>
      </div>
      <span class="paymentSpan" >支付时间：2020-05-08 10:32</span>
      <span class="paymentSpan" >订单编号：62345615151535</span>
      <span class="paymentSpan" >商户号：0561584248549</span>
    </div>
    
  </div>
</template>

<script>
import headNav from '@/components/headNav/headNav.vue'
import { mapActions, mapState, mapGetters, mapMutations } from 'vuex'
export default {
  components: {
    headNav,
  },
  computed: {
    ...mapState({
      studentId: state => state.user.studentId,
      roleCode: state => state.user.roleCode
    })
  },
  data () {
    return {
      num: 1,
      rechargeList: [],  // 充值数组
      paymentList: []    // 支付数组
    }
  },
  methods: {
  },
  mounted() {
  }
}
</script>

<style lang="less" scoped >
 .paymentDiv {
   width: 6.7rem;
   height: 2.5rem;
   margin: 0.3rem 0 0 0.25rem;
   background: #FFF;
   border-radius: 0.15rem;
   div {
     width: 6.4rem;
     margin: 0.2rem 0 0 0.3rem;
     font-size: 0.32rem;
     font-weight: 600;
   }
   img {
     width: 0.4rem;
     height: 0.4rem;
     margin: 0.15rem 0.1rem 0 0;
   }
   .paymentSpan {
     font-size: 0.26rem;
     color: #666666;
     margin: 0.1rem 0 0 0.3rem;
   }
 }

.smallDiv {
   width: 6.8rem;
   height: 2rem;
   margin: 0.3rem 0 0 0.2rem;
   border-radius: 0.15rem;
   background: #FFF;
   font-size: 0.26rem;
   color: #666666;
   .timeNum {
     margin: 0.15rem 0 0 0.3rem;
   }
   .topCss {
     width: 6.4rem;
     display: flex;
     font-size: 0.32rem;
     margin: 0.2rem 0 0 0.3rem;
     img {
       width: 0.4rem;
       height: 0.4rem;
       margin-right: 0.1rem;
     }
     .numCss {
       font-size: 0.34rem;
       color: #FF3000;
       margin-left: 1rem;
       margin-left: 3.5rem;
     }
   }
 }

.titleDiv {
  width: 7.2rem;
  height: 0.92rem;
  background: #FFF;
  display: flex;
  font-size: 0.32rem;
  div {
    width: 50%;
    height: 100%;
  }
}

.choiceCss {
  border-bottom: 2px solid #128FEF;
  font-weight: 600;
}

.flexCenter {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flexHeight {
  display: flex;
  flex-direction: column;
}

.flexAlign {
  display: flex;
  align-items: center;
}

.flexEdge {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>
